package com.jjwt.demo;

import org.junit.Test;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class ListDemo2 {
    public static void main(String[] args) {
            Scanner scanner=new Scanner(System.in);
            List<String> stringList=new ArrayList<>();
            while(true){
                String s = scanner.next();
                if(s.equalsIgnoreCase("end")){
                    break;
                }else if (s.matches("^[0-9]+$")){
                    stringList.add(s);
                }
            }
            stringList.sort(null);
            for (String s : stringList) {
                System.out.println(s);
            }
    }
    @Test
    public void test01(){
        String s="hello";
        for(int i=s.length()-1;i>=0;i--){
            System.out.println(s.charAt(i));
        }
    }
    @Test
    public void test02(){
        String string = "border-bottom-color";
        String[] split = string.split("-");
        String info=split[0];
        for (String s : split) {
            System.out.println(s);

        }
        for(int i=1;i<split.length;i++){
            info+=(char)(split[i].charAt(0)-32)+split[i].substring(1);
        }
        System.out.println(info);

    }


}
